package com.atguigu.chap3;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class MyCallable implements Callable {
    @Override
    public Object call() throws Exception {
        System.out.println(Thread.currentThread().getName() +"===========>   call()方法被执行");
        return 100;
    }

    //线程实现Callable方式
    public static void main(String[] args) {
        FutureTask futureTask = new FutureTask(new MyCallable());
        new Thread(futureTask).start();
    }
}
